import {useState,useEffect} from 'react'
export default function useData(){
    const[list,setList]=useState([])
    useEffect(()=>{
        setTimeout(() => {
            let list=['Giles','Astro','Lucy']
            setList(list)
        }, 1000);
    },[]) 
   return {list}
}  